package cn.iocoder.yudao.module.dbit.dal.mysql.majinfo;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.dbit.dal.dataobject.majinfo.MajInfoDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.dbit.controller.admin.majinfo.vo.*;

/**
 * 共建专业 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface MajInfoMapper extends BaseMapperX<MajInfoDO> {

    default PageResult<MajInfoDO> selectPage(MajInfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<MajInfoDO>()
                .likeIfPresent(MajInfoDO::getMajName, reqVO.getMajName())
                .betweenIfPresent(MajInfoDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(MajInfoDO::getMajId));
    }

}